package com.example.myapp.ADO;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;

import androidx.viewpager.widget.ViewPager;

public class MyViewPager extends ViewPager {

    public MyViewPager(Context context) {
        super(context);
    }

    public MyViewPager(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        Log.w("bbbbb", "onInterceptTouchEvent: 滑动中" );
        try {
            return super.onInterceptTouchEvent(ev);
        } catch (IllegalArgumentException e) {
            //这里就是我们想要处理的问题
            e.printStackTrace();
            Log.w("ccc", "onInterceptTouchEvent: " );

            return false;
        }


    }
}